#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "symbol.h"

int main(){
	printf("Creating tree structuer Figure 1:");
	SymbolTable *table = initSymbolTable();
	SymbolTable *table11 = scopeSymbolTable(table);
	SymbolTable *table12 = scopeSymbolTable(table);
	SymbolTable *table13 = scopeSymbolTable(table);
	SymbolTable *table21 = scopeSymbolTable(table11);
	SymbolTable *table22 = scopeSymbolTable(table12);
	SymbolTable *table23 = scopeSymbolTable(table12);
	SymbolTable *table24 = scopeSymbolTable(table12);
	SymbolTable *table31 = scopeSymbolTable(table23);
	SymbolTable *table32 = scopeSymbolTable(table23);
	printf("table: %d \n",table);
	SYMBOL *put1 = putSymbol(table, "LOLIPOP", 1);
	SYMBOL *put2 = putSymbol(table11, "LOLIPOP", 11);
	SYMBOL *put3 = putSymbol(table12, "LOLIPOP", 12);
	SYMBOL *put4 = putSymbol(table13, "LOLIPOP", 13);
	SYMBOL *put5 = putSymbol(table21, "LOLIPOP", 21);
	SYMBOL *put6 = putSymbol(table22, "LOLIPOP", 22);
	SYMBOL *put8 = putSymbol(table24, "LOLIPOP", 24);
	SYMBOL *put9 = putSymbol(table31, "LOLIPOP", 31);
	SYMBOL *get5 = getSymbol(table32, "LOLIPOP");
	dumpSymbolTable(table24);
	return 1; 
}
